<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
    <IsPackable>true</IsPackable>
    <AddXamarinPlaceholderFilesToPackage>true</AddXamarinPlaceholderFilesToPackage>
    <PackageDescription>Provides access to Windows Data Protection Api.

Commonly Used Types:
System.Security.Cryptography.DataProtectionScope
System.Security.Cryptography.ProtectedData</PackageDescription>
  </PropertyGroup>

  <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
  <PropertyGroup>
    <IsPartialFacadeAssembly Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</IsPartialFacadeAssembly>
    <OmitResources Condition="'$(IsPartialFacadeAssembly)' == 'true'">true</OmitResources>
  </PropertyGroup>

  <ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
    <Compile Include="System\Security\Cryptography\DataProtectionScope.cs" />
    <Compile Include="System\Security\Cryptography\ProtectedData.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CryptProtectData.cs"
             Link="Common\Interop\Windows\Crypt32\Interop.CryptProtectData.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CryptUnprotectData.cs"
             Link="Common\Interop\Windows\Crypt32\Interop.CryptUnprotectData.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CryptProtectDataFlags.cs"
             Link="Common\Interop\Windows\Crypt32\Interop.CryptProtectDataFlags.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.DATA_BLOB.cs"
             Link="Common\Interop\Windows\Crypt32\Interop.DATA_BLOB.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Errors.cs"
             Link="Common\Interop\Windows\Interop.Errors.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.FormatMessage.cs"
             Link="Internal\Windows\kernel32\Interop.FormatMessage.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
             Link="Common\Interop\Windows\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)System\HResults.cs"
             Link="Common\System\HResults.cs" />
    <Compile Include="$(CommonPath)System\Security\Cryptography\CryptoThrowHelper.Windows.cs"
             Link="Common\System\Security\Cryptography\CryptoThrowHelper.Windows.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
    <Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
             Link="Common\DisableRuntimeMarshalling.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
    <Reference Include="System.Security" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
    <PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
  </ItemGroup>

</Project>
